package models

func GetGoodsAll() ([]Goods3, error) {
	var GoodsAll []Goods3
	res := db.Find(&GoodsAll)
	return GoodsAll, res.Error
}
func GetGoodsInfo(goods Goods3) (Goods3, error) {
	var newGoods Goods3
	res := db.Where(goods).First(&newGoods)
	return newGoods, res.Error
}
func GetOrderInfo(order Order3) (Order3, error) {
	newOrder := Order3{}
	res := db.Where(order).First(&newOrder)
	return newOrder, res.Error
}
func SaveOrder(order Order3) (Order3, error) {
	res := db.Save(&order)
	return order, res.Error
}

func GenerateOrder(order Order3) (Order3, error) {
	res := db.Create(&order)
	return order, res.Error
}
